package com.xz.stu.server.vo.calenderEvent;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Data
public class CalendarEventBaseVO {

    @Schema(description = "事件标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "开学典礼")
    @NotBlank(message = "事件标题不能为空")
    @Size(max = 50, message = "事件标题长度不能超过50个字符")
    private String title;

    @Schema(description = "事件类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "start")
    @NotBlank(message = "事件类型不能为空")
    private String eventType;

    @Schema(description = "事件日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "事件日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private String eventDate;

    @Schema(description = "日期类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "normal")
    private String dateType;

    @Schema(description = "备注", example = "在大礼堂举行")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;

    @Schema(description = "提醒时间", example = "0 22 * * * ")
    private String cron;
    /**
     * 是否开启
     */
    private Integer isState;

}
